﻿@model BathhouseService.Areas.CURD.ViewModels.ReportFormVMs.ServiceReportFormListVM

<wt:searchpanel vm="@Model" reset-btn="true">
    <wt:row items-per-row="ItemsPerRowEnum.Three">
        <wt:textbox field="Searcher.ServicePersonName" />
        <wt:datetime field="Searcher.PaymentTime" range="true" />
    </wt:row>
</wt:searchpanel>
<wt:grid vm="@Model" url="/CURD/ReportForm/Search" hidden-grid-index="true" id="grid1"/>
<script>
    function test(id) {
        
        var loaddata = layui.table.cache['grid1'];
        loaddata.forEach(function (val, i) {
            if (val.ID == id) {
                $.ajax({
                    url: '/CURD/ReportForm/Details',
                    type: 'POST',
                    // 设置的是请求参数
                    data: { ID: id, date:val.CurrentMonth },
                    // 用于设置响应体的类型 注意 跟 data 参数没关系！！！
                    dataType: 'Json',
                    success: function (res) {
                        console.log(res)
                    }
                });
            }
        })
        //console.log(loaddata);
        //console.log(id);
    }

</script>